<?php
namespace Home\Controller;
use Think\Controller;
class BpayController extends Controller {
	public function _initialize(){
        vendor('Braintree.lib.Braintree');
        \Braintree_Configuration :: environment('sandbox');
        \Braintree_Configuration :: merchantId('nnrgmsf5ndxhszmp');
        \Braintree_Configuration :: publicKey('664srw7hv35vyrp7');
        \Braintree_Configuration :: privateKey('a954c1c19084824225d02bb12b72b668');
    }
    public function index(){
    	$this->display();
    }
    public function test(){
    }
    public function tokens(){
        $clientToken = \Braintree_ClientToken::generate();
        $this->ajaxReturn($clientToken);
    }
}